//
//  JDRequest.h
//  Jared_AFN_Cache
//
//  Created by Jared on 2017/1/19.
//  Copyright © 2017年 Jared. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JD_AFNetworking.h"
#import "JD_CacheTool.h"
#import "CommonResponseBody.h"
#import "CommonResponseBean.h"

typedef void(^sendBlock)(id ServerData, BOOL isSuccess);

@interface JDRequest : NSObject

- (void)getDataWithParams:(NSDictionary *)params withDataBlock:(sendBlock)sendBlock;

- (void)getListDataBlock:(sendBlock)sendBlock;


- (void)requestDataWithURL:(NSString *)url params:(NSDictionary *)params success:(void(^)(CommonResponseBody *responseBody))sucess failure:(void(^)(CommonResponseBean *result))failure;

- (void)requestListDataWithURL:(NSString *)url params:(NSDictionary *)params cacheType:(JDCacheType)cacheType success:(void(^)(CommonResponseBody *responseBody))sucess failure:(void(^)(CommonResponseBean *result))failure;

@end
